{{template "meta.html" .}}
<body class="{{.PostType}}" data-perma="{{.PermaKey}}">
{{template "cover.html" .}}
<section id="main" class="{{.PostType}}">
    <div class="container">
        <div id="article-list">{{range .Posts}}
            <article class="article">
                <div class="row">
                    <header class="header">
                        <h3 class="title">
                            <a href="{{.URL}}">{{.Title}}</a>
                        </h3>
                    </header>
                    <section class="brief">{{.BriefHTML}}</section>
                    <aside class="aside clearfix">
                        <span class="date">
                            <span class="year">{{.Created.Year}}</span>/
                            <span class="month">{{printf "%0d" .Created.Month}}</span>/
                            <span class="day">{{.Created.Day}}</span>
                        </span>
                        <span class="tags">{{range .Tags}}
                            <a class="tag" href="{{.URL}}">{{.Name}}</a>{{end}}
                        </span>
                        <a class="btn btn-primary btn-lg pull-right" href="{{.URL}}">{{$.I18n.Tr "post.readmore"}}</a>
                    </aside>
                </div>
            </article>{{end}}
            <div class="article-pager">
                {{if .Pager.Prev}}<a href="{{.Pager.PrevURL}}">← {{.I18n.Tr "pager.prev"}}</a>{{end}}
                <span class="current">Page {{.Pager.Current}} of {{.Pager.Pages}}</span>
                {{if .Pager.Next}}<a href="{{.Pager.NextURL}}">{{.I18n.Tr "pager.next"}} →</a>{{end}}
            </div>
        </div>
        {{template "footer.html" .}}
    </div>
</section>
<script>
    $(function () {
        $(".navigation li.active a").on("click", function () {
            var $cover = $('.cover');
            var $main = $('#main');
            $cover.hasClass("index") ? $cover.removeClass("index") && $main.show() : $cover.addClass("index") && $main.hide();
            return false;
        });
    })
</script>
{{template "footer_js.html" .}}
